import { View, Text } from "@tarojs/components";
import { useLoad, useRouter } from "@tarojs/taro";
import "./index.scss";

export default function Index() {
  useLoad(() => {
    console.log("Page loaded.");
  });

  const router = useRouter();
  // decodeURI 解码，decodeURIComponent 解码
  // console.log("🚀 ~ Index ~ router:", decodeURI(router.params.name ?? ""));
  console.log("🚀 ~ Index ~ router:", router.params.name);

  return (
    <View className="index">
      <Text>Hello world! 详情页</Text>
    </View>
  );
}
